<template>
  <div>
      <video class="videoCompont" ref="video" :loop="propValue.loop" :controls="propValue.controls" :autoplay="propValue.autoplay" width="100%" height="100%" :src="propValue.videoUrl" :poster="propValue.posterType?propValue.poster:''"></video>
        <!-- <el-button type="primary" @click="restvode">刷新</el-button> -->
  </div>
</template>

<script>
export default {
 name: 'Video',
   props: {
        propValue: {
            type: Object,
            default: () => {},
        },
        swiperList: {
            type: Array,
            default: () => {},
        },
        element: {
            type: Object,
            default: () => {},
        },
    },
    watch:{
        propValue(value){
            this.$refs.video.load()
        },
    },
    mounted(){
         this.$EventBus.$on('loadVideo',()=>{
            this.$refs.video.load()
         })
    },
    methods:{
     
    }
}
</script>

<style scoped lang="scss">
 .videoCompont{
    object-fit: cover;
 }
</style>